import React, { PropTypes } from 'react';

const propTypes = {
  id: PropTypes.number.isRequired,
  text: PropTypes.string,
};

const defaultProps = {
  text: 'Hello World',
  showTxt: 'loading',
  id:0
};

class Loading extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      id:0,
    }
    // return false;
  }
  static methodsAreOk() {
    return true;
  }
  componentWillMount() {
    console.log('componentWillMount');
    return false;
  }
  componentDidMount() {
    console.log('componentDidMount');
    return false;
  }
  componentWillReceiveProps() {
    console.log('componentWillReceiveProps');
    return false;
  }
  shouldComponentUpdate() {
    return true;
  }
  componentWillUpdate() {
    console.log('componentWillUpdate');
    return false;
  }
  componentDidUpdate() {
    console.log('componentDidUpdate');
    // return false;
  }
  componentWillUnmount() {
    console.log('componentWillUnmount');
    // return false;
  }
  clickHandlers() {
    console.log('clicked');
    // return false;
  }
  render() {
    return (
    	<div v-show="show" id="wxloading" className="wx_loading">
	        <div className="wx_loading_inner">
	            <i className="wx_loading_icon"></i>{this.props.showTxt}...
	        </div>
    	</div>
    );
  }
}

Loading.propTypes = propTypes;
Loading.defaultProps = defaultProps;

export default Loading;